package com.amazon.ags.client.profiles;

import android.util.Log;
import com.amazon.ags.api.AGResponseHandle;
import com.amazon.ags.api.ErrorCode;
import com.amazon.ags.api.profiles.ProfilesClient;
import com.amazon.ags.api.profiles.RequestPlayerProfileResponse;
import com.amazon.ags.client.AmazonGamesService;
import com.amazon.ags.client.GCResponseHandleImpl;

public class ProfilesClientImpl
  implements ProfilesClient
{
  private static final String FEATURE_NAME = "PROFILES";
  private static final String TAG = "PROFILES_" + ProfilesClientImpl.class.getSimpleName();
  private AmazonGamesService amazonGamesService;
  private ProfilesService profilesService;

  public ProfilesClientImpl(AmazonGamesService paramAmazonGamesService, ProfilesService paramProfilesService)
  {
    this.amazonGamesService = paramAmazonGamesService;
    this.profilesService = paramProfilesService;
  }

  public final AGResponseHandle<RequestPlayerProfileResponse> getLocalPlayerProfile(Object[] paramArrayOfObject)
  {
    GCResponseHandleImpl localGCResponseHandleImpl = new GCResponseHandleImpl(paramArrayOfObject);
    if (!this.amazonGamesService.isReady())
    {
      Log.d(TAG, "Service not bound");
      localGCResponseHandleImpl.setResponse(new RequestPlayerProfileResponseImp(22, ErrorCode.SERVICE_NOT_READY));
      return localGCResponseHandleImpl;
    }
    this.profilesService.requestLocalPlayerProfile(localGCResponseHandleImpl);
    return localGCResponseHandleImpl;
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.amazon.ags.client.profiles.ProfilesClientImpl
 * JD-Core Version:    0.6.2
 */